package org.example.kg_back.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.example.kg_back.PoJo.entity.WarnSimilarHistory;

import java.util.List;

/**
 * @Author Colonnello
 * @Gitee https://gitee.com/niuzhengchao
 * @Date 2021/3/15 10:34
 */
@Mapper
public interface WarnSimilarHistoryMapper extends BaseMapper<WarnSimilarHistory> {

	@Select("SELECT gj_sector,gj_acid FROM warnsimilarhistory_number ORDER BY id DESC LIMIT 4;")
	List<WarnSimilarHistory> findWarnSimilarHistory();

	@Select("SELECT gj_sector,gj_acid FROM warnsimilarhistory_number where gj_sector = #{sectorName} ORDER BY id DESC LIMIT 4;")
	List<WarnSimilarHistory> findWarnSimilarOfATC(@Param("sectorName") String sectorName);
}
